<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script type="text/javascript" src="../script/jquery-3.6.0.min.js"></script>
  <script type="text/javascript">
    $(function () {
      $("#b1").focus(function () {
        var currentVal = $(this).val();
        if (currentVal == this.defaultValue) {
         $(this).val("")
        }
      })
      $("#b1").blur(function () {
        var currentVal = $(this).val();
        if(currentVal == ""){
          $(this).val(this.defaultValue)
        }
      })
    })
  </script>
</head>
<body>
<input type="text" value="用户邮箱/手机号/用户名" id="b1"/><br>
<input type="password" value="" id="b2"/><br>
<input type="button" value="登陆" id="b3"/>
</body>
</html>
